home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
025a
/
prgmchk.zip
/
COLSUM.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-08-07
|
1KB
|
40 lines
*(COLSUM.CMD - calculates total number of columns,tables & rows in the current
database. 3 June 91, RBase 3.1; Wm Driskell)
SET QUOTES=NULL
SET QUOTES='
set mess off
out temp$$
list
out scr
create tab Q$$ (name1$ text 8,col1$ int, row1$ int,name2$ text 8, col2$ int, +
row2$ int)
set error mess off *(supress error messages)
out nul *(also suppress warning messages)
load Q$$ from temp$$; fill
out scr *(restore warnings)
set error mess on
set zero on
compute COL$sum as sum(col1$ + col2$) from Q$$
compute ROW$sum as sum(row1$ + row2$) from Q$$
compute TABL1knt as count(name1$) from Q$$
compute TABL2knt as count(name2$) from Q$$
set v tabl$knt = (.tabl1knt + .tabl2knt)
drop table Q$$
cls
list
set v vout text = ('Total number of tables: ' & ctxt(TABL$knt) + ' of 80 max')
write .vout
set v vout = ('Total number of columns: ' & ctxt(COL$sum) + ' of 800 max')
write .vout
set v vout = ('Total rows of data: ' & ctxt(ROW$sum))
write .vout
write ' '
delete temp$$
set mess on
set zero off
clear VARIABLES COL$sum,ROW$sum,TABL$knt,vout,tabl1knt,tabl2knt
return